package Tools;

import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.Statement;

public class DbConnection {
	public Connection init() {
		Connection cn = null;
		try {
			cn = DriverManager.getConnection("proxool.DbPool");
//			System.out.println("Success loading  MySQL Driver...");
			return cn;
		} catch (Exception e) {
			System.out.println("Error loading MySQL Driver...");
			e.printStackTrace();
			return null;
		}
	}
	public void close(Connection cn) {
		try {
			if (cn != null) {
				cn.close();
			}
		} catch (Exception e) {
			e.printStackTrace();
		}
	}

}
